#!/usr/bin/perl -w
my $obj=$ARGV[0];
$obj=~s/\.[c|S]$/.o/;
system(qq(rm -f $obj));
open F,qq(make $ARGV[0] |);
my $cmd;
while(<F>){$cmd=$_;last if/gcc/;};
close F;
shift @ARGV;
print STDERR "$cmd\n";
system qq($cmd);
system qq(cp $obj /tmp/tmp.o;mipsel-linux-objdump -Slz /tmp/tmp.o >/tmp/tmp.S);
$cmd=~s/\s-c\s/ @ARGV -E -C /;
print STDERR "$cmd\n";
system($cmd);
